Integrand size = 21, antiderivative size = 129 \[ \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx=\frac {a \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {b \cos ^2(e+f x)^{\frac {1+p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+p}{2},\frac {2+p}{2},\frac {4+p}{2},\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)} \]
a*hypergeom([1, 1/2+1/2*p],[3/2+1/2*p],-tan(f*x+e)^2)*(g*tan(f*x+e))^(p+1) /f/g/(p+1)+b*(cos(f*x+e)^2)^(1/2+1/2*p)*hypergeom([1+1/2*p, 1/2+1/2*p],[2+ 1/2*p],sin(f*x+e)^2)*sin(f*x+e)*(g*tan(f*x+e))^(p+1)/f/g/(2+p)
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 5.56 (sec) , antiderivative size = 849, normalized size of antiderivative = 6.58 \[ \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx=\frac {2 (a+b \sin (e+f x)) \tan \left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) \operatorname {AppellF1}\left (\frac {1+p}{2},p,1,\frac {3+p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) \operatorname {AppellF1}\left (1+\frac {p}{2},p,2,2+\frac {p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right ) (g \tan (e+f x))^p}{f \left (\sec ^2\left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) \operatorname {AppellF1}\left (\frac {1+p}{2},p,1,\frac {3+p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) \operatorname {AppellF1}\left (1+\frac {p}{2},p,2,2+\frac {p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right )-16 p \cos \left (\frac {1}{2} (e+f x)\right ) \csc ^3(e+f x) \sec (e+f x) \sin ^5\left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) \operatorname {AppellF1}\left (\frac {1+p}{2},p,1,\frac {3+p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) \operatorname {AppellF1}\left (1+\frac {p}{2},p,2,2+\frac {p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right )+2 p \csc (e+f x) \sec (e+f x) \tan \left (\frac {1}{2} (e+f x)\right ) \left (a (2+p) \operatorname {AppellF1}\left (\frac {1+p}{2},p,1,\frac {3+p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+2 b (1+p) \operatorname {AppellF1}\left (1+\frac {p}{2},p,2,2+\frac {p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )\right )+2 (1+p) \sec ^2\left (\frac {1}{2} (e+f x)\right ) \tan \left (\frac {1}{2} (e+f x)\right ) \left (b \operatorname {AppellF1}\left (1+\frac {p}{2},p,2,2+\frac {p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+\frac {a (2+p) \left (-\operatorname {AppellF1}\left (\frac {3+p}{2},p,2,\frac {5+p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+p \operatorname {AppellF1}\left (\frac {3+p}{2},1+p,1,\frac {5+p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right ) \tan \left (\frac {1}{2} (e+f x)\right )}{3+p}+\frac {2 b (2+p) \left (-2 \operatorname {AppellF1}\left (2+\frac {p}{2},p,3,3+\frac {p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+p \operatorname {AppellF1}\left (2+\frac {p}{2},1+p,2,3+\frac {p}{2},\tan ^2\left (\frac {1}{2} (e+f x)\right ),-\tan ^2\left (\frac {1}{2} (e+f x)\right )\right )\right ) \tan ^2\left (\frac {1}{2} (e+f x)\right )}{4+p}\right )\right )} \]
(2*(a + b*Sin[e + f*x])*Tan[(e + f*x)/2]*(a*(2 + p)*AppellF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*b*(1 + p)*Appe llF1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Tan[ (e + f*x)/2])*(g*Tan[e + f*x])^p)/(f*(Sec[(e + f*x)/2]^2*(a*(2 + p)*Appell F1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*b*(1 + p)*AppellF1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]) - 16*p*Cos[(e + f*x)/2]*Csc[e + f*x]^3*Sec[e + f*x]*Sin[(e + f*x)/2]^5*(a*(2 + p)*AppellF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*b*(1 + p)*AppellF1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]) + 2*p*Csc[e + f*x]*Sec[e + f*x]*Tan[(e + f*x)/2]*(a*(2 + p)*AppellF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*b*(1 + p)*AppellF1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2] ^2]*Tan[(e + f*x)/2]) + 2*(1 + p)*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2]*(b*A ppellF1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (a*(2 + p)*(-AppellF1[(3 + p)/2, p, 2, (5 + p)/2, Tan[(e + f*x)/2]^2, -Ta n[(e + f*x)/2]^2] + p*AppellF1[(3 + p)/2, 1 + p, 1, (5 + p)/2, Tan[(e + f* x)/2]^2, -Tan[(e + f*x)/2]^2])*Tan[(e + f*x)/2])/(3 + p) + (2*b*(2 + p)*(- 2*AppellF1[2 + p/2, p, 3, 3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2 ] + p*AppellF1[2 + p/2, 1 + p, 2, 3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e ...
Time = 0.34 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3201, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \sin (e+f x)) (g \tan (e+f x))^pdx\) |
\(\Big \downarrow \) 3201 |
\(\displaystyle \int \left (a (g \tan (e+f x))^p+b \sin (e+f x) (g \tan (e+f x))^p\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a (g \tan (e+f x))^{p+1} \operatorname {Hypergeometric2F1}\left (1,\frac {p+1}{2},\frac {p+3}{2},-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac {b \sin (e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \operatorname {Hypergeometric2F1}\left (\frac {p+1}{2},\frac {p+2}{2},\frac {p+4}{2},\sin ^2(e+f x)\right )}{f g (p+2)}\) |
(a*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p)) + (b*(Cos[e + f*x]^2)^((1 + p)/2)*Hypergeomet ric2F1[(1 + p)/2, (2 + p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sin[e + f*x]*(g*Ta n[e + f*x])^(1 + p))/(f*g*(2 + p))
3.3.5.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( x_)])^(p_.), x_Symbol] :> Int[ExpandIntegrand[(g*Tan[e + f*x])^p, (a + b*Si n[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]
\[\int \left (a +b \sin \left (f x +e \right )\right ) \left (g \tan \left (f x +e \right )\right )^{p}d x\]
\[ \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
\[ \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx=\int \left (g \tan {\left (e + f x \right )}\right )^{p} \left (a + b \sin {\left (e + f x \right )}\right )\, dx \]
\[ \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
\[ \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
Timed out. \[ \int (a+b \sin (e+f x)) (g \tan (e+f x))^p \, dx=\int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,\left (a+b\,\sin \left (e+f\,x\right )\right ) \,d x \]